#pragma once
#include "Syntax/Object/Object.hpp"
#include <string>

class String : public Object
{
public:
    std::string Value;

public:
    String() : String("") {}
    String(std::string str) : Object(TypeKind::String), Value(str) {}

    String(SharedObject ob) : Object(TypeKind::String)
    {
        if (ob->GetType() == TypeKind::String)
        {
            this->Value = ((String *)ob.get())->Value;
        }
        else
        {
            this->Value = "";
        }
    }

    virtual ~String() { this->Value.clear(); }

public:
    virtual std::string ToString() const override { return this->Value; }
};